#include <stdio.h>

int main(int argc, char *argv[]) 
{
	int n,m=1,i=1;
	
	scanf("%d",&n);
	while(m<=n)
	{
		for(;i<=n*m;i++)
		{
			printf("%3d",i);
		}
		printf("\n");
		m++;
	}
}